Skip to content

feat(ci): add path-based filtering to skip e2e on non-Go changes#332

Merged
skevetter merged 2 commits into
mainfrom
f4cc-c412-ws-a-ci-path-filter
May 18, 2026
Merged

feat(ci): add path-based filtering to skip e2e on non-Go changes#332
skevetter merged 2 commits into
mainfrom
f4cc-c412-ws-a-ci-path-filter

Conversation

@skevetter

@skevetter skevetter commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add dorny/paths-filter@v3 to detect Go source changes in pr-ci.yml
  • Gate build-cli and integration test jobs behind path filter output
  • Add ci-success gate job that always reports (pass on skip, fail on failure)

This allows non-Go PRs (docs, CI config, desktop) to merge without running the full 35+ e2e test suite, saving significant CI time and cost.

Summary by CodeRabbit

  • Chores
    • Optimized CI pipeline to skip unnecessary jobs when Go-related files aren't modified
    • Added CI status aggregation job for improved workflow transparency

Review Change Stack

skevetter added 2 commits May 18, 2026 07:53
Add dorny/paths-filter to skip e2e tests when no Go source files
change. The build-cli, integration-tests-unprivileged, and
integration-tests jobs now only run when Go-related paths are modified.
A ci-success gate job always runs and reports overall status, failing
only if a required job failed (not if skipped).
- Add contents: read permission so actions/checkout works on push/
  workflow_dispatch events
- Check needs.changes.result in gate job to catch changes job failures
- Use actions/checkout@v6 for consistency with rest of workflow
@netlify

netlify Bot commented May 18, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 27d4339
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a0b0bc63c93ed0008621cee

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR modifies the CI workflow to detect changes to the workflow file itself, conditionally gate three main CI jobs when Go-related code changes are detected, and introduce a new aggregation job that validates the overall CI success without failing on skipped jobs.

Changes

CI Workflow Change Detection and Job Gating

Layer / File(s) Summary
Workflow trigger filter extension
.github/workflows/pr-ci.yml
The paths-filter configuration for the changes job is extended to include .github/workflows/pr-ci.yml itself as a Go-related trigger, enabling the workflow to detect and act on its own modifications.
Job conditional gating on change detection
.github/workflows/pr-ci.yml
The three primary CI jobs—build-cli, integration-tests-unprivileged, and integration-tests—are each updated to depend on the changes job and gated to run only when needs.changes.outputs.go == 'true', preventing unnecessary execution when Go-related code is unchanged.
CI status aggregation checkpoint
.github/workflows/pr-ci.yml
A new ci-success job is added with if: always() that depends on the core CI jobs and contains a shell check that fails when any required job has result "failure", allowing skipped outcomes, and otherwise reports success for all jobs in the pipeline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • devsy-org/devsy#300: Both PRs modify .github/workflows/pr-ci.yml's CI job wiring—specifically jobs.build-cli's needs/lint dependency—so the main PR's build-cli gating changes are directly related to the retrieved PR's lint-job dependency cleanup.
  • devsy-org/devsy#272: Both PRs modify .github/workflows/pr-ci.yml to change the integration-tests-unprivileged/integration-tests jobs—PR #272 splits the test matrix into privileged vs non-privileged, while the main PR further wires those existing jobs into a changes-gated CI flow and adds a ci-success aggregation check.
  • devsy-org/devsy#84: Both PRs modify .github/workflows/pr-ci.yml to gate build-cli (and other CI jobs) on precommit/lint results via needs/condition changes, so the main PR's job-dependency logic is directly tied to the retrieved PR's gating jobs.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding path-based filtering to skip e2e tests on non-Go changes, which matches the workflow modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@skevetter
skevetter marked this pull request as ready for review May 18, 2026 13:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/pr-ci.yml (1)

3-8: ⚡ Quick win

Consider whether path-based filtering should apply to push events to main.

The workflow applies the same path-based filtering to push events on the main branch as it does to PRs. This means when a non-Go PR is merged to main, the subsequent push event won't run the full e2e test suite.

Common patterns:

  • PR CI: Selective (path-based) to save time and cost ✓
  • Post-merge CI (push to main): Comprehensive to ensure main stays green

If the intent is to always validate main comprehensively, consider limiting the path filter to pull_request events only, or running all jobs unconditionally for push events.

Example: Limit filtering to pull_request events only
   changes:
     runs-on: ubuntu-latest
+    if: github.event_name == 'pull_request'
     permissions:
       contents: read

Then update the conditionals on gated jobs:

-    if: needs.changes.outputs.go == 'true'
+    if: github.event_name != 'pull_request' || needs.changes.outputs.go == 'true'

This would skip the jobs on PRs without Go changes, but always run them on push/workflow_dispatch.

Also applies to: 23-29

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-ci.yml around lines 3 - 8, The push event is currently
subject to the same path-based filters as pull_request which prevents full CI
from running after merges to main; update the YAML so path filters (the paths:
/paths-ignore: or paths: entries) apply only under the pull_request trigger and
not under on: push (or alternatively remove path filtering from push so push to
main always runs full jobs); edit the top-level triggers in the workflow to keep
workflow_dispatch and pull_request with the path filter and make push: branches:
[main] unconditional so post-merge pushes always execute the comprehensive e2e
jobs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/pr-ci.yml:
- Around line 3-8: The push event is currently subject to the same path-based
filters as pull_request which prevents full CI from running after merges to
main; update the YAML so path filters (the paths: /paths-ignore: or paths:
entries) apply only under the pull_request trigger and not under on: push (or
alternatively remove path filtering from push so push to main always runs full
jobs); edit the top-level triggers in the workflow to keep workflow_dispatch and
pull_request with the path filter and make push: branches: [main] unconditional
so post-merge pushes always execute the comprehensive e2e jobs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0b08181d-d5f7-4ad4-80fa-04c3c8e67d1f

📥 Commits

Reviewing files that changed from the base of the PR and between 791c0e7 and 27d4339.

📒 Files selected for processing (1)
  • .github/workflows/pr-ci.yml

@skevetter
skevetter merged commit af92dfc into main May 18, 2026
52 checks passed
@skevetter
skevetter deleted the f4cc-c412-ws-a-ci-path-filter branch May 18, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant